/*
 * @Description:
 * @version:
 * @Author: sunqian_sr
 * @Date: 2022-11-22 10:01:51
 * @LastEditors: Andy
 * @LastEditTime: 2023-02-20 18:07:50
 */
import { Http } from '@/common/api'

const headers = {
  headers: {
    Authorization: 'Basic c3dhcm06c3dhcm0='
  }
}

export const apiPostLogin = async (params) => Http.post('/upms/oauth2/token', params, headers)

export const apiGetLogout = async () => Http.get('/upms/token/logout')
export const apiGetUserPowers = async () => Http.get('/upms/user/findCurrentUserInfo')

const routerParams = {
  appId: '974071430360596480'
}
// export const apiPostRouter = async () => Http.post('/fgap-biz-upms/sysMenu/getRouters', routerParams)

export const apiGetRouter = async () => Http.get('/upms/menu/findRouters')

export const apiGetImage = async () => Http.get('/upms/captcha/image')

export const apiGetMobileCode = async (params) => Http.get('/upms/captcha/sms', params)

export const apiGetUnReadCount = async () => Http.get('/msg/ws/receiver/unreadCount')

// export const apiPutFogetPwd = async (params) =>
//   Http.put(`/upms/user/forgetPwd?captcha=${params.captcha}&captchaKey=${params.captchaKey}`, {
//     mobile: params.mobile,
//     password: params.password
//   })

export const apiPutFogetPwd = async (params) => Http.put('/upms/user/forgetPwd', params)
